3.12 \(\int \frac{\sin ^2(a+b \log (c x^n))}{x^3} \, dx\)

Optimal. Leaf size=98 \[ -\frac{\sin ^2\left (a+b \log \left (c x^n\right )\right )}{2 x^2 \left (b^2 n^2+1\right )}-\frac{b n \sin \left (a+b \log \left (c x^n\right )\right ) \cos \left (a+b \log \left (c x^n\right )\right )}{2 x^2 \left (b^2 n^2+1\right )}-\frac{b^2 n^2}{4 x^2 \left (b^2 n^2+1\right )} \]

[Out]

-(b^2*n^2)/(4*(1 + b^2*n^2)*x^2) - (b*n*Cos[a + b*Log[c*x^n]]*Sin[a + b*Log[c*x^n]])/(2*(1 + b^2*n^2)*x^2) - S
in[a + b*Log[c*x^n]]^2/(2*(1 + b^2*n^2)*x^2)

________________________________________________________________________________________

Rubi [A]  time = 0.0260508, antiderivative size = 98, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.118, Rules used = {4487, 30} \[ -\frac{\sin ^2\left (a+b \log \left (c x^n\right )\right )}{2 x^2 \left (b^2 n^2+1\right )}-\frac{b n \sin \left (a+b \log \left (c x^n\right )\right ) \cos \left (a+b \log \left (c x^n\right )\right )}{2 x^2 \left (b^2 n^2+1\right )}-\frac{b^2 n^2}{4 x^2 \left (b^2 n^2+1\right )} \]

Antiderivative was successfully verified.

[In]

Int[Sin[a + b*Log[c*x^n]]^2/x^3,x]

[Out]

-(b^2*n^2)/(4*(1 + b^2*n^2)*x^2) - (b*n*Cos[a + b*Log[c*x^n]]*Sin[a + b*Log[c*x^n]])/(2*(1 + b^2*n^2)*x^2) - S
in[a + b*Log[c*x^n]]^2/(2*(1 + b^2*n^2)*x^2)

Rule 4487

Int[((e_.)*(x_))^(m_.)*Sin[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(d_.)]^(p_), x_Symbol] :> Simp[((m + 1)*(e*x)
^(m + 1)*Sin[d*(a + b*Log[c*x^n])]^p)/(b^2*d^2*e*n^2*p^2 + e*(m + 1)^2), x] + (Dist[(b^2*d^2*n^2*p*(p - 1))/(b
^2*d^2*n^2*p^2 + (m + 1)^2), Int[(e*x)^m*Sin[d*(a + b*Log[c*x^n])]^(p - 2), x], x] - Simp[(b*d*n*p*(e*x)^(m +
1)*Cos[d*(a + b*Log[c*x^n])]*Sin[d*(a + b*Log[c*x^n])]^(p - 1))/(b^2*d^2*e*n^2*p^2 + e*(m + 1)^2), x]) /; Free
Q[{a, b, c, d, e, m, n}, x] && IGtQ[p, 1] && NeQ[b^2*d^2*n^2*p^2 + (m + 1)^2, 0]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rubi steps

\begin{align*} \int \frac{\sin ^2\left (a+b \log \left (c x^n\right )\right )}{x^3} \, dx &=-\frac{b n \cos \left (a+b \log \left (c x^n\right )\right ) \sin \left (a+b \log \left (c x^n\right )\right )}{2 \left (1+b^2 n^2\right ) x^2}-\frac{\sin ^2\left (a+b \log \left (c x^n\right )\right )}{2 \left (1+b^2 n^2\right ) x^2}+\frac{\left (b^2 n^2\right ) \int \frac{1}{x^3} \, dx}{2 \left (1+b^2 n^2\right )}\\ &=-\frac{b^2 n^2}{4 \left (1+b^2 n^2\right ) x^2}-\frac{b n \cos \left (a+b \log \left (c x^n\right )\right ) \sin \left (a+b \log \left (c x^n\right )\right )}{2 \left (1+b^2 n^2\right ) x^2}-\frac{\sin ^2\left (a+b \log \left (c x^n\right )\right )}{2 \left (1+b^2 n^2\right ) x^2}\\ \end{align*}

Mathematica [A]  time = 0.100985, size = 58, normalized size = 0.59 \[ -\frac{b n \sin \left (2 \left (a+b \log \left (c x^n\right )\right )\right )-\cos \left (2 \left (a+b \log \left (c x^n\right )\right )\right )+b^2 n^2+1}{4 x^2 \left (b^2 n^2+1\right )} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[a + b*Log[c*x^n]]^2/x^3,x]

[Out]

-(1 + b^2*n^2 - Cos[2*(a + b*Log[c*x^n])] + b*n*Sin[2*(a + b*Log[c*x^n])])/(4*(1 + b^2*n^2)*x^2)

________________________________________________________________________________________

Maple [F]  time = 0.058, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( \sin \left ( a+b\ln \left ( c{x}^{n} \right ) \right ) \right ) ^{2}}{{x}^{3}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a+b*ln(c*x^n))^2/x^3,x)

[Out]

int(sin(a+b*ln(c*x^n))^2/x^3,x)

________________________________________________________________________________________

Maxima [B]  time = 1.15096, size = 378, normalized size = 3.86 \begin{align*} -\frac{2 \,{\left (b^{2} \cos \left (2 \, b \log \left (c\right )\right )^{2} + b^{2} \sin \left (2 \, b \log \left (c\right )\right )^{2}\right )} n^{2} + 2 \, \cos \left (2 \, b \log \left (c\right )\right )^{2} +{\left ({\left (b \cos \left (2 \, b \log \left (c\right )\right ) \sin \left (4 \, b \log \left (c\right )\right ) - b \cos \left (4 \, b \log \left (c\right )\right ) \sin \left (2 \, b \log \left (c\right )\right ) + b \sin \left (2 \, b \log \left (c\right )\right )\right )} n - \cos \left (4 \, b \log \left (c\right )\right ) \cos \left (2 \, b \log \left (c\right )\right ) - \sin \left (4 \, b \log \left (c\right )\right ) \sin \left (2 \, b \log \left (c\right )\right ) - \cos \left (2 \, b \log \left (c\right )\right )\right )} \cos \left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right ) + 2 \, \sin \left (2 \, b \log \left (c\right )\right )^{2} +{\left ({\left (b \cos \left (4 \, b \log \left (c\right )\right ) \cos \left (2 \, b \log \left (c\right )\right ) + b \sin \left (4 \, b \log \left (c\right )\right ) \sin \left (2 \, b \log \left (c\right )\right ) + b \cos \left (2 \, b \log \left (c\right )\right )\right )} n + \cos \left (2 \, b \log \left (c\right )\right ) \sin \left (4 \, b \log \left (c\right )\right ) - \cos \left (4 \, b \log \left (c\right )\right ) \sin \left (2 \, b \log \left (c\right )\right ) + \sin \left (2 \, b \log \left (c\right )\right )\right )} \sin \left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right )}{8 \,{\left ({\left (b^{2} \cos \left (2 \, b \log \left (c\right )\right )^{2} + b^{2} \sin \left (2 \, b \log \left (c\right )\right )^{2}\right )} n^{2} + \cos \left (2 \, b \log \left (c\right )\right )^{2} + \sin \left (2 \, b \log \left (c\right )\right )^{2}\right )} x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*log(c*x^n))^2/x^3,x, algorithm="maxima")

[Out]

-1/8*(2*(b^2*cos(2*b*log(c))^2 + b^2*sin(2*b*log(c))^2)*n^2 + 2*cos(2*b*log(c))^2 + ((b*cos(2*b*log(c))*sin(4*
b*log(c)) - b*cos(4*b*log(c))*sin(2*b*log(c)) + b*sin(2*b*log(c)))*n - cos(4*b*log(c))*cos(2*b*log(c)) - sin(4
*b*log(c))*sin(2*b*log(c)) - cos(2*b*log(c)))*cos(2*b*log(x^n) + 2*a) + 2*sin(2*b*log(c))^2 + ((b*cos(4*b*log(
c))*cos(2*b*log(c)) + b*sin(4*b*log(c))*sin(2*b*log(c)) + b*cos(2*b*log(c)))*n + cos(2*b*log(c))*sin(4*b*log(c
)) - cos(4*b*log(c))*sin(2*b*log(c)) + sin(2*b*log(c)))*sin(2*b*log(x^n) + 2*a))/(((b^2*cos(2*b*log(c))^2 + b^
2*sin(2*b*log(c))^2)*n^2 + cos(2*b*log(c))^2 + sin(2*b*log(c))^2)*x^2)

________________________________________________________________________________________

Fricas [A]  time = 0.499001, size = 198, normalized size = 2.02 \begin{align*} -\frac{b^{2} n^{2} + 2 \, b n \cos \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) \sin \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right ) - 2 \, \cos \left (b n \log \left (x\right ) + b \log \left (c\right ) + a\right )^{2} + 2}{4 \,{\left (b^{2} n^{2} + 1\right )} x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*log(c*x^n))^2/x^3,x, algorithm="fricas")

[Out]

-1/4*(b^2*n^2 + 2*b*n*cos(b*n*log(x) + b*log(c) + a)*sin(b*n*log(x) + b*log(c) + a) - 2*cos(b*n*log(x) + b*log
(c) + a)^2 + 2)/((b^2*n^2 + 1)*x^2)

________________________________________________________________________________________

Sympy [A]  time = 82.0819, size = 643, normalized size = 6.56 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*ln(c*x**n))**2/x**3,x)

[Out]

Piecewise((log(x)*sin(-a + I*log(x) + I*log(c)/n)**2/(4*x**2) + I*log(x)*sin(-a + I*log(x) + I*log(c)/n)*cos(-
a + I*log(x) + I*log(c)/n)/(2*x**2) - log(x)*cos(-a + I*log(x) + I*log(c)/n)**2/(4*x**2) - 3*sin(-a + I*log(x)
 + I*log(c)/n)**2/(8*x**2) - cos(-a + I*log(x) + I*log(c)/n)**2/(8*x**2) + log(c)*sin(-a + I*log(x) + I*log(c)
/n)**2/(4*n*x**2) + I*log(c)*sin(-a + I*log(x) + I*log(c)/n)*cos(-a + I*log(x) + I*log(c)/n)/(2*n*x**2) - log(
c)*cos(-a + I*log(x) + I*log(c)/n)**2/(4*n*x**2), Eq(b, -I/n)), (log(x)*sin(a + I*log(x) + I*log(c)/n)**2/(4*x
**2) + I*log(x)*sin(a + I*log(x) + I*log(c)/n)*cos(a + I*log(x) + I*log(c)/n)/(2*x**2) - log(x)*cos(a + I*log(
x) + I*log(c)/n)**2/(4*x**2) - 3*sin(a + I*log(x) + I*log(c)/n)**2/(8*x**2) - cos(a + I*log(x) + I*log(c)/n)**
2/(8*x**2) + log(c)*sin(a + I*log(x) + I*log(c)/n)**2/(4*n*x**2) + I*log(c)*sin(a + I*log(x) + I*log(c)/n)*cos
(a + I*log(x) + I*log(c)/n)/(2*n*x**2) - log(c)*cos(a + I*log(x) + I*log(c)/n)**2/(4*n*x**2), Eq(b, I/n)), (-b
**2*n**2*sin(a + b*n*log(x) + b*log(c))**2/(4*b**2*n**2*x**2 + 4*x**2) - b**2*n**2*cos(a + b*n*log(x) + b*log(
c))**2/(4*b**2*n**2*x**2 + 4*x**2) - 2*b*n*sin(a + b*n*log(x) + b*log(c))*cos(a + b*n*log(x) + b*log(c))/(4*b*
*2*n**2*x**2 + 4*x**2) - 2*sin(a + b*n*log(x) + b*log(c))**2/(4*b**2*n**2*x**2 + 4*x**2), True))

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sin \left (b \log \left (c x^{n}\right ) + a\right )^{2}}{x^{3}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b*log(c*x^n))^2/x^3,x, algorithm="giac")

[Out]

integrate(sin(b*log(c*x^n) + a)^2/x^3, x)